import Axios from 'axios'

import Nprogress from 'nprogress'

Axios.defaults.baseURL="http://47.101.45.245:8878"

Axios.interceptors.request.use((config) => {
    Nprogress.start()
    return config
}, (error) => {
    return Promise.reject(error)
})

Axios.interceptors.response.use((response) => {
    Nprogress.done()
    return response
}, (error) => {
    return Promise.reject(error)
})

export default Axios